package chat01;

public class Person {
    private int age;
    public void setAge(int age){
        if (age<0 || age>100){
            System.out.println("年龄不合法");
        }else {
            System.out.println("你输入的年龄合法");
            this.age=age;
        }
    }
}
